<template>
	<view class="content">
		<view class="tiao"></view>
		<view class="tou">
			<view class="row" v-for="(row,index) in couponValidList" :key="index">
				
					<view class="images">
						<!-- <image class="image" src="../static/logo.png" mode=""></image> -->
					</view>
					<view class="dur">
						<view class="title">
							{{row.name}}
						</view>
						<view class="term">
							{{row.phone}}
						</view>
				</view>
				<view class="jifen">
					<view style="float: left;"><view v-if="row.type==1">+</view><view v-else>-</view></view><view style="float:left;">{{row.passcard}}</view>
				</view>
</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				couponValidList: [],
				headerTop: 0,
				//控制滑动效果
				typeClass: 'valid',
				subState: '',
				theIndex: null,
				oldIndex: null
			}
		},
		onPageScroll(e) {

		},
		onLoad() {
			// 获取邀请奖励信息
			uni.request({
				url:'http://tuiguang.yiyunoto.com/api/member/mem_award',
				header:{authtoken:this.$store.state.token},
				method:'POST',
				success:(res)=>{
					console.log("奖励请求成功",res)
					this.couponValidList=res.data.data
				},
				fail:(res)=>{
					console.log("请求失败",res)
				}
			})
			//兼容H5下排序栏位置
			// #ifdef H5
			//定时器方式循环获取高度为止，这么写的原因是onLoad中head未必已经渲染出来。
			let Timer = setInterval(() => {
				let uniHead = document.getElementsByTagName('uni-page-head');
				if (uniHead.length > 0) {
					this.headerTop = uniHead[0].offsetHeight + 'px';
					clearInterval(Timer); //清除定时器
				}
			}, 1);
			// #endif
		},
		methods: {
			touchEnd(index, $event) {
				//解除禁止触发状态
				this.isStop = false;
			},
		}
	}
</script>

<style>
	.content {
		width: 100%;
		height: 100vh;
		background:#EDEDED;
	}
	.tiao {
		width: 100%;
		height: 1upx;
		background: #EDEDED;
	}
	.images {
		float: left;
		margin-left: 30upx;
		margin-top: 27upx;
		width: 88upx;
		height: 88upx;
		background: rgba(216, 216, 216, 1);
		border-radius: 50upx;
	}
	.dur {
		float: left;
		margin-left: 22upx;
			padding-left: 30upx;
	}

	.row {
		
		width: 100%;
		height: 143upx;
		background: #FFFFFF;
		margin-top: 2upx;
		border-bottom-width: 1upx;
		border-bottom-style: solid;
		border-bottom-color: #EDEDED;
	}

	.title {
		
		padding-left: 22upx;
		padding-top: 30upx;
		font-size:32upx;
font-family:PingFangSC-Regular,PingFangSC;

color:rgba(41,41,41,1);
	}

	.term {
		font-size: 26upx;
		font-family: PingFangSC-Regular, PingFangSC;
		color: rgba(127, 127, 127, 1);
		padding-left: 22upx;
		padding-top: 1upx;
	}

	.jiangli {
		font-size: 41upx;
		font-family: PingFangSC-Regular, PingFangSC;
		color: rgba(51, 51, 51, 1);
		padding-left: 610upx;
		padding-top: 43upx;
		
	}
	.jifen {
		font-size: 41upx;
		font-family: PingFangSC-Regular, PingFangSC;
		color: rgba(51, 51, 51, 1);
		padding-left: 510upx;
		padding-top: 43upx;
	}
</style>
